package com.jackchan.homework.sysw.entity;

import com.jackchan.homework.common.IdEntity;
import com.jackchan.homework.system.entity.User;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ch-hui on 15/12/24.
 * 配方标准
 */
@Entity
@Table(name = "t_recipe")
public class Recipe extends IdEntity {

    private String recipeName;

    private Float recipeCost;

    private Float totalProduction;

    private Date createTime;

    private User createUser;

    @Column(name = "recipe_name")
    public String getRecipeName() {
        return recipeName;
    }

    public void setRecipeName(String recipeName) {
        this.recipeName = recipeName;
    }

    @Column(name = "recipe_cost")
    public Float getRecipeCost() {
        return recipeCost;
    }

    public void setRecipeCost(Float recipeCost) {
        this.recipeCost = recipeCost;
    }

    @Column(name = "total_production")
    public Float getTotalProduction() {
        return totalProduction;
    }

    public void setTotalProduction(Float totalProduction) {
        this.totalProduction = totalProduction;
    }

    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @ManyToOne
    @JoinColumn(name = "create_user_id", referencedColumnName = "id")
    public User getCreateUser() {
        return createUser;
    }

    public void setCreateUser(User createUser) {
        this.createUser = createUser;
    }
}
